﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MixScript.BLL.FI;
using System.Data;

namespace MixScriptWeb.Accounting.ReportObject
{
    public partial class rptCostGoodSold : cCommonWeb, IMIxCommon // System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            { LoadData(); }
        }
        private void LoadData()
        {

            DataTable dt = new DataTable();
            rptGeneralJournal gj = new rptGeneralJournal();
            gj.getActivePeriod(out dt);
            FillDropDownList(ddlPeriod, dt, "Name", "ID", true);
            FillDropDownList(ddlCurrency, "mst_currency", "currency", "currency", true);
        }
        public bool isvalid()
        {
            return true;
        }
        protected void btnSubmit_Click(Object sender, EventArgs e)
        {
            Session["PeriodName"] = ddlPeriod.SelectedItem.Text;
            Session["PeriodID"] = ddlPeriod.SelectedItem.Value;
            Session["CUR"] = ddlCurrency.SelectedItem.Text;


            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW",
                "window.open( '/Accounting/ReportObject/rpt_COGS.aspx', null, '' );", true);

        }
    }
}